﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Assignment9.Models {
    public class Goods
    {
        public string Id { get; set; }

        public Goods()
        {
            Id = Guid.NewGuid().ToString();
        }
        public string Name { get; set; }
        int Price;
        public int getPrice() { return Price; }
        public Goods(string name, int price) : this()
        {
            Name = name;
            Price = price;
        }
        //重写ToString方法
        public override string ToString()
        {
            return $"Goods name: {Name}, Price: {Price}";
        }
    }


}
